import { getNewsByIdAPI } from '../../api/news';
import { NewsSaveList } from './actionTypes';

export const getNewsByIdAction = (id) => {
  return async (dispatch) => {
    const res = await getNewsByIdAPI(id);
    dispatch({ type: NewsSaveList, payload: res.data.results });
  };
};
